import { get, _delete, post, patch } from '@/plugins/axios'
import { URL_PREFIX } from '../index'

/* 文件分类查询接口 */
export const apiGetCates = (params) => get(URL_PREFIX + `/myapp/api/file/get-class`, params)

/*  文件分类新增接口 */
export const apiPostCreateCates = (data) => post(URL_PREFIX + `/myapp/api/file/save-class`, data)

/*  文件分类删除接口 */
export const apiDeleteCate = (classID, userID) => _delete(URL_PREFIX + `/myapp/api/file/delete-class/${classID}/${userID}`)

/* 文件分类查询全部接口 */
export const apiGetAllCates = (params) => get(URL_PREFIX + `/myapp/api/file/all-class`, params)

/* 文件分类变更接口 */
export const apiCatesModify = (id, data) => patch(URL_PREFIX + `/myapp/api/documents/${id}/tags`, data)